#include <stdio.h>
#include <stdlib.h>
#include "dynamic.h"
#include "elf_hook.h"

static void* old_func;

static void hook_test(){
	printf("hook test: %p\n", old_func);
	((void(*)())old_func)();
}

int main(int argc, char** argv)
{
	printf("Hello World start\n");
	elf_t* elf = read_from_maps();
	if (elf == NULL){
		abort();
	}
	elf_hook(elf, hook_test, &old_func);
	test();
	printf("Hello World end\n");
}
